<template>
	<view class="card4" v-for="item in arr" @click="tiaoZhuan(item.medicalID)">
		<view class="cardItem3">
			<view class="img">
				<image :src="'http://localhost:3000/uploads/'+item.packageImage"></image>
			</view>
			<view class="dec">
				<view class="title3">{{item.packageName}}</view>
				<view>
					<text class="la">项目：</text>
					<text class="la">一般检查/常规检查/血液检查/尿液检查/内科检查/hpv检查</text>
				</view>
			</view>
		</view>
		<view class="cardItem4">
			<text>￥</text>
			<text>{{item.packagePrice}}</text>
		</view>
	</view>
</template>

<script>
	import {
		ref,
		toRefs,
		reactive,
		getCurrentInstance
	} from 'vue'
	export default {
		name:"taoCan",
		props:['arr','patientsData'],
		setup(props){
			const data=reactive({
				arrData:[],
			})
			// console.log(props.arr,222);
			// console.log(props.patientsData);
			
			const tiaoZhuan=(val)=>{
				uni.setStorageSync('listData',props.patientsData)
				props.arr.forEach((item)=>{
					if(item.medicalID==val){
						data.arrData=item;
					}
				})
				uni.setStorageSync('arrData',data.arrData)
				uni.navigateTo({
					url: '/pages/home/bodyExamine/packageDetails/packageDetails'
				});
			}
			return {...toRefs(data),tiaoZhuan}
		}
		
	}
</script>

<style>
 .card4{
	 border: 1px solid rgba(0,0,0,0.2);
	 box-shadow:  1px 2px 2px 1px rgba(0, 0, 0, 0.2);
	 background-color: white;
	 display: flex;
	 flex-direction: row;
	 justify-content: space-between;
	 align-items: center;
	 padding: 20rpx;
	 box-sizing: border-box;
	 margin-bottom: 30rpx;
 }
 image{
	 width: 120rpx;
	 height: 120rpx;
 }
 .cardItem3{
	 display: flex;
	 flex-direction: row;
	 align-items: center;
 }
 .dec{
	 width: 60%;
	 color: rgba(0,0,0,0.4);
	 margin-left: 10rpx;
 }
 .title3{
	 color: black;
	 padding-bottom: 20rpx;
	 box-sizing: border-box;
 }
 .cardItem4{
	 color: coral;
 }
 .la{
	 font-size: 23rpx;
 }
</style>